/*
 *  登录
 *
 * @Author:    zhoujk
 * @Date:      2022-09-03 21:59:58
 */
import { getRequest, postRequest } from '/@/lib/axios'

export const loginApi = {
  /**
   * 获取验证码 @author 卓大
   */
  getCaptcha: () => {
    return postRequest('/b-auth/auth/generate/captcha')
  },

  /**
   * 登录 @author 卓大
   */
  login: (param) => {
    return postRequest('/b-auth/auth/login', param)
  },

  /**
   * 退出登录 @author 卓大
   */
  logout: () => {
    return postRequest('/b-auth/auth/logout')
  },

  /**
   * 获取登录信息 @author 卓大
   */
  getLoginInfo: () => {
    return postRequest('/b-auth/auth/get_login')
  },

  /**
   * 获取短信验证码
   */
  getSmsCode: (data) => {
    return postRequest('/b-auth/auth/sms/send', data)
  },

  /**
   * 验证短信验证码
   */
  verifySmsCode: (data) => {
    return postRequest('/b-auth/auth/verify', data)
  },

  /**
   * 重置密码
   */
  resetPassword: (data) => {
    return postRequest('/b-auth/auth/reset/password', data)
  },
}
